//
//  CashTableViewCell.m
//  location
//
//  Created by Dongxiang Xu on 2025/10/16.
//

#import "CashTableViewCell.h"

@interface CashTableViewCell ()

@property (nonatomic, strong) UIImageView *img;

@end

@implementation CashTableViewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        self.contentView.backgroundColor = LightBGColor;
        
        _img = [[UIImageView alloc] initWithFrame:CGRectMake(16, 12, SCREEN_WIDTH-32, (SCREEN_WIDTH-32)*0.237)];
        [self.contentView addSubview:_img];
    }
    return self;
}

- (void)loadWithInfo:(NSDictionary *)info
{
    if ([info[@"sel"] integerValue]==0) {
        _img.image = [UIImage imageNamed:info[@"img"]];
        [_img setFrame:CGRectMake(16, 12, SCREEN_WIDTH-32, (SCREEN_WIDTH-32)*0.237)];
    }else{
        _img.image = [UIImage imageNamed:info[@"sel_img"]];
        [_img setFrame:CGRectMake(16, 12, SCREEN_WIDTH-32, (SCREEN_WIDTH-32)*0.367)];
    }
}

@end
